package com.css.fxfzxczh.modules.disasterDamageInfo.verify;

import cn.afterturn.easypoi.excel.entity.result.ExcelVerifyHandlerResult;
import cn.afterturn.easypoi.handler.inter.IExcelVerifyHandler;
import com.css.fxfzxczh.modules.disasterDamageInfo.vo.DisasterAssessImportVo;
import com.css.fxfzxczh.modules.disasterDamageInfo.vo.DisasterDamageImportVo;
import com.css.fxfzxczh.util.PlatformObjectUtils;
import org.springframework.stereotype.Component;

@Component
public class DisasterAssessExcelVerify implements IExcelVerifyHandler<DisasterAssessImportVo> {



    @Override
    public ExcelVerifyHandlerResult verifyHandler(DisasterAssessImportVo disasterAssess) {
        ExcelVerifyHandlerResult result = new ExcelVerifyHandlerResult(true);
        StringBuilder message = new StringBuilder("");



        if (PlatformObjectUtils.isEmpty(disasterAssess.getAssessUnit())) {
            result.setSuccess(false);
            message.append("灾害评估单位 不能为空！");
        }

        if (PlatformObjectUtils.isEmpty(disasterAssess.getAssessNumber())) {
            result.setSuccess(false);
            message.append("灾害评估数量 不能为空！");
        }
















        result.setMsg(message.toString());
        return result;
    }

}
